<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .overflow-bfc .b1{
      width: 100px;
      height:100px;
      background: red;
      margin-bottom: 100px;
    }
    .overflow-bfc .b2{
      width: 100px;
      height:100px;
      background: green;
      margin-top: 100px;
      margin-bottom: 100px;
    }
    .overflow-bfc{
      overflow: hidden;
    }
    .overflow-bfc .b3{
      width: 100px;
      height:100px;
      background: yellow;
      margin-top: 100px;
    }
    .float{
      width: 200px;
      height: 300px;
      background: blue;
      float: left;
    }
    .fr{
      overflow: hidden;
      /* width: 100%; */
      height: 300px;
      background: violet;
    }
  </style>
</head>
<body>
  <!-- float不为none会生成bfc -->
  <div class="overflow-bfc">
    <div class="b1"></div>
    <div class="b2"></div>
  </div>
  <div class="overflow-bfc">
    <div class="b3"></div>
  </div>

  <div class="float"></div>
  <div class="fr"></div>
</body>
</html>